package demo06TemplateMethodPattern;

/**
 * @author: WangPeng
 * @createTime: 2022/11/10 17:51
 * @description:
 * @version: v1.0
 */
public interface ChaoChai {
    //买食材
    void Buy();
    //处理食材
    void chuLi();
    //起锅烧油
    void qiGuoSaoYou();
    //放入食材
    void putInto();
    //开始调味
    void add();
    //翻炒均匀
    void fanChao();
    //盛菜
    void putOut();

    //炒菜
    default void chaoCai(){
         Buy();
         chuLi();
         qiGuoSaoYou();
         putInto();
         add();
         fanChao();
         putOut();
     }
}

